<h1>
  产品图片
</h1>

<table>
  <tr>
    <th>图片名</th>
    <th>图像类别</th>
    <th>产品名称</th>
  </tr>
<%=will_paginate @pro_images %>
<% for pro_image in @pro_images %>
  <tr>
    <td><%=image_tag("/images/proimages/#{pro_image.name.gsub(".","_s.")}",:size=>"30x30") if pro_image.name%></td>
    <td><%=h pro_image.description %></td>
    <td><%=h pro_image.img_name %></td>
   
    <td><%= link_to 'Edit', edit_pro_image_path(pro_image) %></td>
    <td><%= link_to 'Destroy', pro_image_path(pro_image), :confirm => 'Are you sure?', :method => :delete %></td>
  </tr>
<% end %>
</table>

<br />
<%=link_to_if params[:product_id]!="0", "添加相关图片",new_product_pro_image_path(params[:product_id])%>

